﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Linq.Mapping;

namespace StudentMgmt.Model
{
    [Serializable]
    [Table(Name = "Student")]
    public class StudentInfo
    {
        public StudentInfo() { }

        public StudentInfo(string studentNo, string studentName, string sex, string classId, string birthday, string nativePlace)
        {
            this.StudentNo = studentNo;
            this.StudentName = studentName;
            this.Sex = sex;
            this.ClassId = classId;
            this.Birthday = birthday;
            this.NativePlace = nativePlace;
        }

        [Column(Name = "StuNo", IsPrimaryKey = true, DbType = "char(6)")]
        public string StudentNo { get; set; }

        [Column(Name = "StuName", DbType = "varchar(20)")]
        public string StudentName { get; set; }

        [Column(Name = "Sex", DbType = "char(1)")]
        public string Sex { get; set; }

        [Column(Name = "ClassId", DbType = "char(6)")]
        public string ClassId { get; set; }
        [Column(Name = "Birthday", DbType = "date")]
        public string Birthday { get; set; }

        [Column(Name = "Native_Place", DbType = "varchar(50)")]
        public string NativePlace { get; set; }
    }
}
